<?php
/**
 * <i>replace</i>定义
 * 
 * @version $Id: IMintReplaceModifier.php 312 2008-04-23 16:29:38Z iwind $
 * @package util.mint.modifier
 * @since 0.0.2
 */
class IMintReplaceModifier extends IAbstractMintModifier {
	/**
	 * 构造器
	 *
	 */	
	public function __construct() {
		
	}
	
	/**
	 * 执行
	 *
	 * @return scalar
	 */	
	public function execute(/** $search, $replace **/) {
		$string = $this->getVariable();
		$arguments = $this->getArguments();
		$search = isset($arguments[0])?$arguments[0]:"";
		$replace = isset($arguments[1])?$arguments[1]:"";
		return str_replace($search, $replace, $string);
	}
}

?>